package rbac.domain.vo;

import rbac.domain.enums.RoleDataScope;
import rbac.util.DateTimeUtils;

import java.time.LocalDateTime;

/**
 * 角色-视图对象
 */

public class RoleVo extends BaseVo{
    public String name;
    public RoleDataScope dataScope;

    public RoleVo() {
    }

    public RoleVo(Integer id, LocalDateTime createAt, LocalDateTime updateAt, String name, RoleDataScope dataScope) {
        super(id, createAt, updateAt);
        this.name = name;
        this.dataScope = dataScope;
    }

    @Override
    public String toString(){
        return String.format("ID: %d, 名称：%s， 更新时间：%s",
                id, name, DateTimeUtils.format(updateAt));
    }
}

